require("./../../js/qrcode/qrcode.min.js");
import $ from 'jquery';
global.$ = global.jQuery = $;
(function ($) {
    var qrcode = new QRCode(document.getElementById("qrcode"), {
        text: code_url,
        width: 250,
        height: 250,
        colorDark: "#000000",
        colorLight: "#ffffff",
        correctLevel: QRCode.CorrectLevel.H
    });

    function wxpayCheck() {
        var url = app_order_wxpayCheck;
        $.getJSON(url, {}, function (responseText) {
            if (typeof responseText == "string")
                var responseText = $.parseJSON(responseText);
            if ((responseText.code == 200) && (responseText.data.status == 1)) {
                location.assign(app_order_paysuccess);
            }
        });
    }
    setInterval('wxpayCheck()', 2000);

})(jQuery);
